﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Collections;
using System.Xml;
using System.Threading;

namespace ImageEditor
{
    public partial class Form1 : Form
    {
        private ArrayList StatesManager = new ArrayList();
        private MapPanel _mapPanel;

        public Form1()
        {
            InitializeComponent();
            InitializeForm();
            ShowDisclaimer();
        }

        void InitializeForm()
        {
            _mapPanel = new MapPanel();
            this.Controls.Add(_mapPanel);
        }

        private void Form1_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar.Equals(Keys.Left))
            {
                _mapPanel.UpdateMap("LEFT");
            }
            else if (e.KeyChar.Equals(Keys.Right))
            {
                _mapPanel.UpdateMap("RIGHT");
            }
        }

        public void ShowDisclaimer()
        {
            String disclaimerText = "THE MATERIAL EMBODIED IN THIS SOFTWARE IS PROVIDED TO YOU \"AS-IS\" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE CENTERS FOR DISEASE CONTROL AND PREVENTION (CDC) OR THE UNITED STATES (U.S.) GOVERNMENT BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR NOT CDC OR THE U.S. GOVERNMENT HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.";
            MessageBox.Show(disclaimerText);
        }
    }
}
